String[] list = new String[3];
list[3] = "dog" ;

A good answer might be:

An ArrayIndexOutOfBounds exception is thrown and (ordinarily) the program halts.


Vector class

The Vector class builds upon the capabilities of arrays. A Vector object contains an array of object references plus many methods for managing that array. The biggest convenience of a Vector is that you can keep adding elements to it no matter what size it was originally. The size of the Vector will automatically increase and no information will be lost.

However, this convenience comes at a small price:

  1. The elements of a Vector must be object references, not primitive data like int or double.
  2. Vector operations are slighly slower than using an array.

QUESTION 4:

(Review: ) What is the Object class?